#!/bin/bash

# svg2pdf: exactly what its name suggests; requires inkscape
for f in $@ ; do
	if [[ -d "$f" ]]; then
		for f2 in `ls $f*.svg`; do
			svg2pdf $f2
		done
	else
		INFILE="$f"
		OUTFILE="${INFILE%.svg}.pdf"
		inkscape -z --export-pdf=$OUTFILE --export-area-drawing -f $INFILE
	fi
done
